<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="../../include/admincontent.jsp" %>
<link rel="stylesheet" href="../../../resources/js/plugins/layui/css/layui.css"/>
<script src="../../../resources/js/plugins/layui/layui.all.js" type="text/javascript"></script>
<style>
    #deltalentpanel table thead tr td {
        text-align: left !important;
        border-right: solid 1px #ddd !important;
    }
    .nothide {
        margin-top: 42px;
    }
</style>
<div id="location">当前位置：首页 > 人才简历库 > 人才储备库</div>
<div id="Content">
    <div class="toolbars" style="height:30px;white-space:nowrap;width:auto;margin-left: 10px;" totalwidth="314">
        <a id="newtalent">
            <em class="ico16 add_new"></em>
            <span class="menu_span">新建人才库</span>
        </a>
        <a id="deltalent">
            <em class="ico16 editor_16"></em>
            <span class="menu_span">删除人才库</span>
        </a>
        <a id="sendtobtn">
            <em class="ico16 del_16"></em>
            <span class="menu_span">转入人才库</span>
        </a>
        <a id="talentpoolout">
            <em class="ico16 authorize_16"></em>
            <span class="menu_span">转出人才库</span>
        </a>
        <a id="topro">
            <em class="ico16 authorize_16"></em>
            <span class="menu_span">加入招聘方案</span>
        </a>
        <a id="exportUserHeader">
            <em class="ico16 authorize_16"></em>
            <span class="menu_span">导出简历头像</span>
        </a>
        <a id="CVimp">
            <em class="ico16 import_16"></em>
            <span class="menu_span">导入简历</span>
        </a>
        <%-- <a width="60" id="combineQuery" class="font_size12 common_button combinedQuery">高级查询</a>--%>
        <a id="combineQuery">
            <em class="ico16 search_disable_16"></em>
            <span>高级查询</span>
        </a>
    </div>

    <!-- 新建人才库 -->
    <div id="newtalentpanel" class="condition_cont nothide">
        <form id="newtalentform" >
            <table class="treeTable searchform">
                <thead>
                <tr>
                    <td width="60">名称:</td>
                    <td width="400">
                        <div><input type="text" name="name" datatype="*"/></div>
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <td>描述:</td>
                    <td>
                        <div><textarea rows="" cols="" name="remark"></textarea></div>
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <td></td>
                    <td colspan="2">
                        <button id="AddTypeActionSubmit" type="button" class="op blue-btn">提交</button>
                    </td>
                </tr>
                </thead>
            </table>
        </form>
    </div>

    <!-- 删除人才库 -->
    <div id="deltalentpanel" class="condition_cont nothide">
        <div class="help"><b>温馨提醒：</b>删除人才库会将该人才库下的所有人才简历从人才库中移除，请谨慎操作！</div>
        <table class="treeTable searchform">
            <thead>
            <tr>
                <td width="30">序号</td>
                <td width="200">名称</td>
                <td width="300">描述</td>
                <td>删除</td>
            </tr>
            </thead>
            <tbody id="talents"></tbody>
        </table>
    </div>

    <!-- 转入人才库 -->
    <div id="sendtopanel" class="condition_cont nothide">
        <table class="treeTable searchform">
            <thead>
            <tr>
                <td width="60">人才库:</td>
                <td>
                    <div style="width:200px"><select name="tid">
                        <option value="">选择人才储备库</option>
                        ${rck}</select></div>
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <button id="sendtosubmitbtn" type="button" class='op'>提交</button>
                </td>
            </tr>
            </thead>
        </table>
    </div>

    <!-- 加入招聘方案 -->
    <div id="sendtopro" class="condition_cont nothide">
        <table class="treeTable searchform">
            <thead>
            <tr>
                <td width="80">创建时间(年):</td>
                <td width="200">
                    <div><select id="addYear" lay-verify="" lay-search>${addYears}</select></div>
                </td>
                <td width="60">招聘方案:</td>
                <td width="300">
                    <div><select id="proid">${projects}</select></div>
                </td>
                <td width="60" id="postit" style="display:none;">招聘岗位:</td>
                <td width="200" id="posval" style="display:none;">
                    <div><select id="posid"></select></div>
                </td>
                <td></td>
            </tr>
            <tr>
                <td></td>
                <td colspan="6">
                    <button id="sendtoprobtn" type="button" class='op'>提交</button>
                </td>
            </tr>
            </thead>
        </table>
    </div>

    <!-- 导入建立(word)-->
    <div id="impCVWord" class="condition_cont nothide">
        <form action="/talentpool/putCV" method="post" enctype="multipart/form-data">
            <table class="treeTable searchform">
                <thead>
                <tr>
                    <td width="100">类型：</td>
                    <td width="200">
                        <select name="type">
                            <option value="校招">校园招聘</option>
                            <option value="社招">社会招聘</option>
                        </select>
                    </td>
                    <td width="80">文件：</td>
                    <td width="200">
                        <input type="file" name="file"/>
                    </td>
                    <td width="560"></td>
                </tr>
                <tr>
                    <td></td>
                    <td colspan="6">
                        <button class="op" type="submit">提交</button>
                    </td>
                </tr>
                </thead>
            </table>
        </form>
    </div>

</div>
<div id="sy_search" class=" f0f0f0" style="display: inline-block">
    <form id="advanceQueryParam" style="display: none">
        <div style="background-color: #f0f0f0">
            <div class="clearfix more_query_area special-search">
                <div class="query_area_body clearfix">
                    <div class="record_item">
                        <div class="record_item">
                            <div class="label">人才库:</div>
                            <div class="content">
                                <div><select name="libid">
                                    <option value="">所有人才储备库</option>
                                    ${rck}
                                </select></div>
                            </div>
                        </div>
                    </div>
                    <div class="record_item">
                        <div class="record_item">
                            <div class="label">身份证号:</div>
                            <div class="content">
                                <div><input type="text" name="cardno"/></div>
                            </div>
                        </div>
                    </div>
                    <div class="record_item">
                        <div class="record_item">
                            <div class="label">联系电话:</div>
                            <div class="content">
                                <div><input type="text" name="tel"/></div>
                            </div>
                        </div>
                    </div>
                    <div class="record_item">
                        <div class="record_item">
                            <div class="label">性别:</div>
                            <div class="content">
                                <div><select name="sex">
                                    <option value="">不限</option>
                                    ${xb}
                                </select></div>
                            </div>
                        </div>
                    </div>
                    <br>
                    <div class="record_item">
                        <div class="record_item">
                            <div class="label">姓名:</div>
                            <div class="content">
                                <div><input type="text" name="name"/></div>
                            </div>
                        </div>
                    </div>
                    <div class="record_item">
                        <div class="record_item">
                            <div class="label">毕业院校:</div>
                            <div class="content">
                                <div><input type="text" name="university"/></div>
                            </div>
                        </div>
                    </div>
                    <div class="record_item">
                        <div class="record_item">
                            <div class="label">所学专业:</div>
                            <div class="content">
                                <div><input type="text" name="majorname"/></div>
                            </div>
                        </div>
                    </div>
                    <div class="record_item">
                        <div class="record_item">
                            <div class="label">最高学历:</div>
                            <div class="content">
                                <div><select name="education">
                                    <option value="">不限</option>
                                    ${education}
                                </select></div>
                            </div>
                        </div>
                    </div>
                    <br>
                    <div class="record_item">
                        <div class="record_item">
                            <div class="label">民族:</div>
                            <div class="content">
                                <div><select name="minzu">
                                    <option value="">不限</option>
                                    ${minzu}
                                </select></div>
                            </div>
                        </div>
                    </div>
                    <div class="record_item">
                        <div class="record_item">
                            <div class="label">政治面貌:</div>
                            <div class="content">
                                <div><select name="zzmm">
                                    <option value="">不限</option>
                                    ${zzmm}
                                </select></div>
                            </div>
                        </div>
                    </div>
                    <div class="record_item">
                        <div class="record_item">
                            <div class="label">婚姻状况:</div>
                            <div class="content">
                                <div><select name="marriage">
                                    <option value="">不限</option>
                                    ${hunfou}
                                </select></div>
                            </div>
                        </div>
                    </div>
                    <div class="record_item">
                        <div class="record_item">
                            <div class="label">是否放弃:</div>
                            <div class="content">
                                <div><select name="fqstate">
                                    <option value="">全部</option>
                                    <option value="未放弃" selected>未放弃</option>
                                    <option value="已放弃">已放弃</option>
                                </select></div>
                            </div>
                        </div>
                    </div>
                    <br>
                    <div class="record_item special-select">
                        <div class="record_item">
                            <div class="label">专业技术职务:</div>
                            <div class="content">
                                <div class="input_group">
                                    <select name="posttype" id="s_postt" style="width: 135px">
                                        <option value="">不限</option>
                                        ${posttype}
                                    </select>
                                    <select name="postlevel" id="s_postl" style="width: 136px">
                                        <option value="">不限</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="record_item special2">
                        <div class="record_item">
                            <div class="label">职业资格证:</div>
                            <div class="content">
                                <div class="input_group">
                                    <select name="qllevelpid" id="s_jndjp">
                                        <option value="">不限</option>
                                        ${jndj}
                                    </select>
                                    <select name="qllevelcode" id="s_jndj">
                                        <option value="">不限</option>
                                    </select>
                                    <select name="qllevelscode" id="s_jndjs">
                                        <option value="">不限</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <br>
                    <div class="record_item position1">
                        <div class="record_item">
                            <div class="label">年龄:</div>
                            <div class="content">
                                <div class="input_group">
                                    <input type="text" name="agefrom"/>
                                </div>
                                <span class="middle_line"></span>
                                <div class="input_group">
                                    <input type="text" name="ageto"/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="record_item position1">
                        <div class="record_item">
                            <div class="label">工作年限:</div>
                            <div class="content">
                                <div class="input_group">
                                    <input type="text" name="workyearfrom"/>
                                </div>
                                <span class="middle_line"></span>
                                <div class="input_group">
                                    <input type="text" name="workyearto"/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="record_item position1">
                        <div class="record_item">
                            <div class="label" style="width: 68px">身高:</div>
                            <div class="content">
                                <div class="input_group">
                                    <input type="text" name="heightfrom"/>
                                </div>
                                <span class="middle_line"></span>
                                <div class="input_group">
                                    <input type="text" name="heightto"/>
                                </div>
                            </div>
                        </div>
                    </div>
                    <br>
                    <div class="record_item">
                        <div class="record_item">
                            <div class="label">身份证所在地:</div>
                            <div class="content">
                                <div><input type="text" name="cardaddress"/></div>
                            </div>
                        </div>
                    </div>
                    <div class="record_item">
                        <div class="record_item">
                            <div class="label">户口所在地:</div>
                            <div class="content">
                                <div><input type="text" name="hukouaddress"/></div>
                            </div>
                        </div>
                    </div>
                    <div class="record_item">
                        <div class="record_item">
                            <div class="label">现居住地:</div>
                            <div class="content">
                                <div><input type="text" name="nowaddress"/></div>
                            </div>
                        </div>
                    </div>
                    <div class="record_item">
                        <div class="toolbars">
                            <a id="searchbtn">
                                <em class="ico16 search_16"></em>
                                <span class="menu_span" title="查询">查询</span>
                            </a>
                            <a id="searchreset">
                                <em class="ico16 refresh_16"></em>
                                <span class="menu_span" title="重置">重置</span>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
    <%--  <a width="60" id="combineQuery" class="font_size12 common_button combinedQuery">查询</a>--%>
</div>
<div style="overflow:hidden">
    <div id="div_table" style="bottom: 0px">
        <table class="layui-hide" id="table" lay-filter="talentpoolTable"></table>
    </div>
</div>

<div id="exprotForm" style="display: none">
    <form id="excelValid" method="POST" action="" enctype="multipart/form-data">
        <div class="help">
            <b>注意：</b><br>
            1、第一行必须是标题,并且存在以"身份证"开头的列名。<br>
            2、数据导入请上传excel格式(<b>支持：xls和xlsx</b>)文件。
        </div>
        <table class="treeTable searchform">
            <thead>

            <tr>
                <td width="80">Excel文件：</td>
                <td>
                    <div><input type="file" name="excel" datatype="*" nullmsg="请选择Excel文件"/></div>
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <button class="op" id="exprotFormsubmit">导入Excel</button>
                </td>
            </tr>
            </thead>
        </table>
    </form>
</div>
<script type="text/javascript">
    $(function () {
        $("#checkTest").click(function () {
            var checkIds = $(".allcheckbox").data('checkIds');
            console.log(checkIds);
        })
    })


    $(document).ready(function () {
        layui.use('table', () => {
            let table = layui.table;
            table.render({
                id: 'table'
                , elem: '#table'
                , height: 'full'
                , url: '/talentpool/getresumesJson?' + $("#advanceQueryParam").serialize() + "&resumeType=${resume_type}" //数据接口
                , title: '用户表'
                , page: true //开启分页
                , cols: [[ //表头
                    {type: 'checkbox', fixed: 'left', width: '5%'}
                    , {type: 'numbers', title: '序号', width: '5%', sort: true}
                    , {
                        field: 'NAME', title: '姓名', width: '9%', sort: true, templet: (d) => {
                            if (d.CARDCOUNT > 1) {
                                return "<a target='_blank' style='color: #2490f8;' href='/UserResume/ViewResumeCardno?cardno="
                                    + d.CARDNO + "'>" + d.NAME + "</a>&nbsp;<span class='layui-badge'>"
                                    + d.CARDCOUNT + "</span>";
                            } else {
                                return "<a target='_blank' style='color: #2490f8;' href='/UserResume/ViewResumeCardno?cardno="
                                    + d.CARDNO + "'>" + d.NAME + "</a>";
                            }
                        }
                    }
                    , {field: 'SEXNAME', title: '性别', width: '9%', sort: true}
                    , {field: 'MNAME', title: '婚否', width: '9%', sort: true}
                    , {field: 'ZZMMNAME', title: '政治面貌', width: '9%', sort: true}
                    , {field: 'CARDNO', title: '身份证', width: '9%', sort: true}
                    , {field: 'UNIVERSITY', title: '毕业院校', width: '9%', sort: true}
                    , {field: 'MAJORNAME', title: '专业', width: '9%', sort: true}
                    , {field: 'EDUCATIONNAME', title: '学历', width: '9%', sort: true}
                    , {field: 'TEL', title: '电话', width: '9%', sort: true}
                    , {field: 'RESUME_TYPE', title: '所属人才储备库', width: '9%', sort: true}
                ]]
            });
            reload = () => {
                table.reload('table');
            }
            document.tablereload = reload;
            $("#searchbtn").on('click', () => {
                table.reload('table', {
                    url: '/talentpool/getresumesJson?' + $("#advanceQueryParam").serialize()
                    , page: {
                        curr: 1
                    }
                    , done: (res, curr, count) => {
                        tableresize(diff, false)
                    }
                })
            })
            $("#sendtosubmitbtn").click(function () {
                var tid = $('#sendtopanel select[name=tid]').val();
                // if (tid.length > 0) {
                //     DelInfo('/talentpool/SendToAction?tid=' + tid);
                //
                // } else {
                //     layer.alert('请选择人才储备库', {icon: 5, closeBtn: 0});
                // }
                let chosendata = layui.table.checkStatus("table").data;
                let ids = chosendata.map((item, index, array) => {
                    return {name: "id", value: item.ID};
                });
                LDeleteInfo('/talentpool/SendToAction?tid=' + tid, reload, null, 'table', ids)
            });
        });

        //新建人才库
        $('#newtalent').click(function () {
            $(this).toggleClass('cur').blur().siblings().removeClass('cur');
            $('.condition_cont').hide();
            if ($(this).hasClass('cur')) {
                $('#newtalentpanel').slideToggle(300);
            }
        });
        $("#CVimp").click(function () {
            $(this).toggleClass('cur').blur().siblings().removeClass('cur');
            $('.condition_cont').hide();
            if ($(this).hasClass('cur')) {
                $('#impCVWord').slideToggle(300);
            }
        });
        $("#impCVWord").ajaxForm((data)=>{
            reload();
            $("#CVimp").click();
        })
        // $("#newtalentform").Validform({
        //     ajaxPost: true,
        //     callback: function (data) {
        //         if (data.state) {
        //             layer.alert(data.Message, {icon: 6, closeBtn: 0});
        //             gettlist();
        //         } else {
        //             layer.alert(data.Message, {icon: 5, closeBtn: 0});
        //         }
        //     }
        // });

        $("#AddTypeActionSubmit").click(()=>{
            $.ajax({
                url: "/talentpool/AddTypeAction?" + $("#newtalentform").serialize(),
                //type: 'POST',
                //data: data,
                success: function (data) {
                    layer.msg(data.Message, {icon: 1, time: 2000});
                    setTimeout(()=>{
                        parent.location.reload();
                    }, 2000);

                },
                error: function (data) {
                    layer.msg(data.Message, {icon: 2, time: 2000});
                }
            });
        })


        //删除人才库
        $('#deltalent').click(function () {
            $(this).toggleClass('cur').blur().siblings().removeClass('cur');
            $('.condition_cont').hide();
            if ($(this).hasClass('cur')) {
                $('#deltalentpanel').slideToggle(300);
            }
        });
        gettlist();
        $(document).delegate('#deltalentpanel .link a', 'click', function () {
            postAjax('/talentpool/DelTalentAction?id=' + $(this).attr('rel'), null, function (data) {
                if (data.state) {
                    layer.alert(data.Message, {icon: 6, closeBtn: 0});
                    gettlist();
                } else {
                    layer.alert(data.Message, {icon: 5, closeBtn: 0});
                }
            });
        });

        //转入人才库
        $('#sendtobtn').click(function () {
            $(this).toggleClass('cur').blur().siblings().removeClass('cur');
            $('.condition_cont').hide();
            if ($(this).hasClass('cur')) {
                $('#sendtopanel').slideToggle(300);
            }
        });

        //转出人才库
        $('#talentpoolout').click(function () {
            let chosendata = layui.table.checkStatus("table").data;
            let ids = chosendata.map((item, index, array) => {
                return {name: "id", value: item.ID};
            });
            LDeleteInfo('/talentpool/RemoveAction', reload, null, 'table', ids);
        });


        //加入招聘方案
        $('#topro').click(function () {
            $(this).toggleClass('cur').blur().siblings().removeClass('cur');
            $('.condition_cont').hide();
            if ($(this).hasClass('cur')) {
                $('#sendtopro').slideToggle(300);
            }
        });
        $("#sendtoprobtn").click(function () {
            var pid = $('#proid').val();
            var jid = $('#posid').val();
            if (pid == null) {
                layer.alert('请选择招聘方案', {icon: 5, closeBtn: 0});
                return;
            }
            let chosendata = layui.table.checkStatus('table').data;

            if (chosendata.length < 1) {
                layer.msg('请选择一条信息', {icon: 7, time: 2000});
            } else if (chosendata.length > 1) {
                layer.msg('只能选择一条信息', {icon: 7, time: 2000});
            } else {
                let id = chosendata[0].ID;
                LDeleteInfo('/talentpool/AddToPro?pid=' + pid + '&jid=' + jid + '&id=' + id
                    , (msg) => {
                        layer.msg(msg.Message);
                    }, null, 'table')
            }
            // var hrtype = $("#proid").find("option:selected").attr("hrtype");
            // if (hrtype == '3' || hrtype == '1' || hrtype == '2') {
            //     /*if (jid == null) {
            //         layer.alert('请选择招聘职位', {icon: 5, closeBtn: 0});
            //         return;
            //     }*/
            //     DelInfo1('/talentpool/AddToPro?pid=' + pid + '&jid=' + jid);
            //     /* } else if (hrtype == '2') {
            //          if (jid == null) {
            //              layer.alert('请选择招聘地区', {icon: 5, closeBtn: 0});
            //              return;
            //          }
            //          var region = $("#posid").find("option:selected").text();
            //          DelInfo1('/talentpool/AddToPro?pid=' + pid + '&rcode=' + jid + '&region=' + region);*/
            // } else {
            //     DelInfo1('/talentpool/AddToPro?pid=' + pid + '&jid=' + jid);
            // }
        });

        //从招聘计划选择招聘方案
        // getproject();
        /* $('#planid').change(function () {
             getproject();
         });*/

        //根据添加年月选择招聘方案
        $('#addYear').change(function () {
            getprojectByYear();
        });

        //从招聘方案选择招聘岗位
        getposition();
        $('#proid').change(function () {
            getposition();
        });


        // getList();
        // $('#searchbtn').click(function () {
        //     getList();
        // });



        //上传excel导出名单中人员照片
        /*$('#exportUserHeader').click(function () {
            layer.open({
                title:'根据EXCEL中身份证号导出相片',
                type:2,
                area: ['80%','80%'],
                //content:$('#exprotForm')
                content:'












        ${fpath}/API/excelOutForm'
            });
        });*/
        function tableresize(diff, resizeout = true) {
            let height3 = $("#div_table").height();
            let height4 = $(".layui-table-body.layui-table-main").height();
            let height5 = $(".layui-form.layui-border-box.layui-table-view").height();


            if (resizeout) {
                $("#div_table").height(height3 - diff);
            }
            $(".layui-table-body.layui-table-main").height(height4 - diff);
            $(".layui-form.layui-border-box.layui-table-view").height(height5 - diff);
        }

        let diff;
        let origin = {};
        $("#combineQuery").on('click', (e) => {
            let $el = $(e.target)
            let style = $("#advanceQueryParam")[0].style;

            if (style.display === 'block') {
                style.display = 'none';
                diff = -origin.diff;
                $el.text('查询')
            } else {
                style.display = 'block';
                if (!origin.diff) {
                    origin.diff = document.documentElement.scrollHeight - document.documentElement.clientHeight;
                }
                diff = origin.diff;
                $el.text('隐藏')
            }
            tableresize(diff);
        });
        $("#searchreset").on('click', (e) => {
            document.getElementById("advanceQueryParam").reset();
            $("input[name='deptcode']").val("")
        });

    });


    $(function () {
        //上传excel导出名单中人员照片
        $('#exportUserHeader').click(function () {
            layer.open({
                title: '根据EXCEL中身份证号导出相片',
                type: 2,
                area: ['80%', '80%'],
                //content:$('#exprotForm')
                content: '${fpath}/API/excelOutForm'
            });
        });
    });

    //简历列表信息
    // function getList() {
    //     $("#page").myPagination({
    //         cssStyle: "pagination",
    //         singleCheck: true,
    //         saveChecked: true,
    //         ajax: {
    //             on: true,
    //             url: '/talentpool/getresumes',
    //             param: $("#conditionform").serialize(),
    //             dataType: 'html',
    //             callback: function (data) {
    //                 $("#result").html(data);
    //             }
    //         }
    //     });
    // }

    //人才库分类列表
    function gettlist() {
        getAjax('/talentpool/gettalents', null, function (data) {
            $('#talents').html(data);
        });
    }

    //获得招聘方案
    function getproject() {
        getAjax('/talentpool/getproject?planid=' + $('#planid').val(), null, function (data) {
            $("#proid").html(data);
            getposition();
        });
    }

    //根据年份选择方案
    function getprojectByYear() {
        $("#proid").empty();
        getAjax('/talentpool/getproject?year=' + $('#addYear').val(), null, function (data) {
            $("#proid").html(data);
            getposition();
        });
    }


    //读取社会招聘岗位信息
    function getposition() {
        //招聘方式(3为社会招聘/1为高校校园招聘)
        var hrtype = $("#proid").find("option:selected").attr("hrtype");
        if (hrtype === '3' || hrtype === '1' || hrtype === '2' || hrtype === '4' || hrtype === '5') {
            $('#postit').show().html('招聘岗位:');
            $('#posval').show();
            getAjax('/talentpool/getposition?proid=' + $('#proid').val(), null, function (data) {
                $("#posid").html(data);
            });
            /* } else if (hrtype == '2') {
                 $('#postit').show().html('招聘地区:');
                 $('#posval').show();
                 getAjax('/talentpool/getregion?proid=' + $('#proid').val(), null, function (data) {
                     $("#posid").html(data);
                 });*/
        } else {
            $('#postit').hide();
            $('#posval').hide();
            $("#posid").html(null);
        }
    }
</script>
</body>
</html>